Skip to content

Allow current LinearSolve for downstream ControlSystemsMTK tests - #4742

Merged
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/linearsolve-compat-controlsystemsmtk
Jul 13, 2026
Merged

Allow current LinearSolve for downstream ControlSystemsMTK tests#4742
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/linearsolve-compat-controlsystemsmtk

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Jul 13, 2026

Copy link
Copy Markdown
Member

This PR should be ignored until reviewed by @ChrisRackauckas.

Summary

  • Allow ModelingToolkit and ModelingToolkitBase to resolve LinearSolve 4/5, in addition to the existing LinearSolve 3 lower bounds.
  • Keep one initialization result assertion stable across the broadened solver/platform matrix by changing its absolute tolerance from 1e-6 to 2e-6, with the numerical reason documented beside the test.

The compat change fixes a downstream precompile failure seen from Optimization's ModelingToolkit downstream job. The shared downstream workflow develops the upstream PR package into ModelingToolkit's test environment; the MTK test stack then loads ControlSystemsMTK. With the old LinearSolve 3-only compat, the downstream test environment resolved LinearSolve v3.87.0 and failed while precompiling LinearSolveArnoldiMethodExt:

UndefVarError: `ArnoldiMethodJL` not defined in `LinearSolve`

Resolving the downstream environment with the broadened compat picks LinearSolve v4.3.0 for test/downstream, and ControlSystemsMTK precompiles successfully.

The Julia 1.13.0-rc1 ModelingToolkitBase job on the broadened stack measured an absolute initialization error of 1.001607e-6, only 1.607e-9 beyond the old assertion while the solve itself requests abstol = reltol = 1e-6. The identical CI-equivalent command and dependency versions passed locally, as did the root nightly job. The assertion now uses a still-tight 2e-6 absolute bound; no solver tolerance or failure mode is disabled.

Validation

Downstream reproduction:

rm -f Manifest.toml test/Manifest.toml test/downstream/Manifest.toml lib/ModelingToolkitBase/Manifest.toml
GROUP=Downstream timeout 3600 julia +1.12 --startup-file=no --project=. -e 'using Pkg; Pkg.develop(PackageSpec(path="../Optimization.jl")); Pkg.update(); Pkg.status(["LinearSolve", "Optimization", "ModelingToolkit", "ControlSystemsMTK"]); Pkg.test(; coverage=false)'

Observed:

test/downstream resolved LinearSolve v4.3.0
ControlSystemsMTK precompiled successfully
Downstream | 31/31
Testing ModelingToolkit tests passed

Julia 1.13.0-rc1 CI-equivalent GROUP=Initialization after the final rebase:

Guess Propagation: 11/11
InitializationSystem Test: 638 passed, 12 pre-existing broken
Initial Values Test: 63/63
ModelingToolkitBase tests passed

Repository-wide Runic 1.7.0 --check . and git diff --check both passed.

The current red InterfaceI downgrade check is an exact clean-master SymbolicUtils floor mismatch tracked separately in the PR comments; it fails during dependency resolution before exercising this branch.

@AayushSabharwal

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member Author

Addressed the tolerance feedback in commit 69e3e98.

The Julia 1.13.0-rc1 ModelingToolkitBase job produced an absolute error of 1.001607e-6, only 1.607e-9 beyond the existing 1e-6 assertion threshold. The same CI-equivalent command and dependency versions passed locally, and the root nightly job also passed, which points to platform-level numerical variation at the requested 1e-6 solver tolerance.

Change:

  • Increased only this assertion tolerance from 1e-6 to 2e-6.
  • Added an adjacent comment documenting why the tolerance is wider.

Local verification on Julia 1.13.0-rc1 with GROUP=Initialization and the CI test options:

  • Guess Propagation: 11/11
  • InitializationSystem Test: 638 passed, 12 pre-existing broken
  • Initial Values Test: 63/63
  • ModelingToolkitBase tests passed

Runic 1.7.0 --check . also passed.

@ChrisRackauckas-Claude
ChrisRackauckas-Claude force-pushed the agent/linearsolve-compat-controlsystemsmtk branch from 69e3e98 to 47f46d7 Compare July 13, 2026 12:18

Copy link
Copy Markdown
Member Author

Rebased the PR onto current upstream master (fd8305b) after the intervening initialization and CI fixes merged.

Rewritten PR commits:

  • 3c5e0a0: broaden LinearSolve compatibility
  • 47f46d7: relax the initialization assertion tolerance

Both commits retain the required co-author trailer. After the rebase I reran the Julia 1.13.0-rc1 CI-equivalent Initialization group:

  • Guess Propagation: 11/11
  • InitializationSystem Test: 638 passed, 12 pre-existing broken
  • Initial Values Test: 63/63
  • ModelingToolkitBase tests passed

Runic 1.7.0 --check . also passed. The branch update used an explicit SHA lease after confirming the remote had no additional commits.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

The red Downgrade / Downgrade Tests - InterfaceI check is an exact clean-master failure, not introduced by this PR. Clean master at fd8305b225 failed in run 29244934982: the downgrade action explicitly selected SymbolicUtils = 4.35.2, while the in-tree ModelingToolkitBase 1.51.1 now requires SymbolicUtils = 4.35.3, leaving no resolvable version. The PR job fails for the same resolver conflict before tests run. I am keeping that clean-base dependency-floor repair separate from this focused LinearSolve PR.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

CI audit update for the red Benchmarks (lts) check:

  • The benchmark suite itself completed and produced both time and memory tables for 47f46d714e.
  • The reported ratios are near parity; for example, ODEProblem time is 4.42 ± 0.2 ms on master vs 4.62 ± 0.53 ms on this branch, and the memory table reports identical allocations for every measured case.
  • The job is marked failed only in the final comment-publication step: peter-evans/create-or-update-comment@v5 received HTTP 403 Resource not accessible by integration while posting to PR Allow current LinearSolve for downstream ControlSystemsMTK tests #4742. The workflow token has pull-request metadata read permission, not comment write permission.

This is a workflow-permission failure after successful benchmark execution, not a benchmark regression. Failing job: https://github.com/SciML/ModelingToolkit.jl/actions/runs/29249396441/job/86813968486

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

CI audit update for the red ModelingToolkitStandardLibrary/Core downstream check:

This is an exact clean-master failure, independent of #4742. PR job 86813978519 errors in downstream/test/motor.jl because the independent variable is ModelingToolkitBase.PleaseImportDynamicQuantities, leading to _check_if_dde(..., ::PleaseImportDynamicQuantities, ...) with no method. Clean master fd8305b225, run 29244934396, job 86819996357 fails with the same PleaseImportDynamicQuantities / _check_if_dde error, one file earlier in downstream/test/piston.jl.

The recently merged ModelingToolkitStandardLibrary #483 fixed this owner import in that repository own test/motor.jl, but ModelingToolkit downstream test harness still lacks the owner-module import needed by its piston/motor fixtures. Per the clean-main audit rule, this is being assigned to a separate reproduce/bisect/fix investigation rather than folded into #4742 without analysis.

PR job: https://github.com/SciML/ModelingToolkit.jl/actions/runs/29249396526/job/86813978519
Clean-master job: https://github.com/SciML/ModelingToolkit.jl/actions/runs/29244934396/job/86819996357

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

The red QA / Julia 1 / Ubuntu check is a self-hosted runner/reporting failure, not a reported test assertion. Job metadata marks the job completed/failure at 13:25:16 UTC, but its Run tests step remains in_progress and every later step remains pending. GitHub has no uploaded log blob for the completed job; the logs endpoint returns BlobNotFound / HTTP 404. There is therefore no package failure output to act on. Job: https://github.com/SciML/ModelingToolkit.jl/actions/runs/29249397246/job/86816532314

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

CI audit update for the red ModelingToolkitBase QA check: this is also exact clean master. PR job 86820621953 and clean-master job 86820576774 both pass JET 54/54, then Aqua reports the same three classes: 45 method ambiguities, five unbound-type-parameter methods, and the same SymbolicUtils/JumpProcesses piracy list. Both finish Aqua at 8 pass / 3 fail.

None of these methods or QA settings is changed by #4742. This cluster requires its own reproduce/bisect/fix audit; I will not silence Aqua or add broad ignores. PR job: https://github.com/SciML/ModelingToolkit.jl/actions/runs/29249397225/job/86820621953 ; clean-master job: https://github.com/SciML/ModelingToolkit.jl/actions/runs/29244935232/job/86820576774

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Existing clean-main audit linkage for the ModelingToolkitBase QA cluster: issue #4670 already contains the exact local reproduction, commit boundaries, and ownership analysis for all three remaining Aqua classes. Focused draft #4738 fixes the five unbound-method reports without ignores and passes Aqua.test_unbound_args(ModelingToolkitBase) locally; #4737 already merged the independent metadata fixes. The 45 ambiguities and 14 piracy-reported methods remain documented in #4670, including the owning-package moves/API redesign needed for the piracy set. No duplicate issue or QA suppression is needed here.

@ChrisRackauckas-Claude
ChrisRackauckas-Claude force-pushed the agent/linearsolve-compat-controlsystemsmtk branch from 47f46d7 to 8e6fc7f Compare July 13, 2026 13:56
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Rebased the PR again onto current upstream/master (aa4afff870) after master advanced during CI. The updated tolerance commit is 8e6fc7f52b; the remote branch was verified unchanged before the SHA-specific lease update.

Post-rebase local validation used the direct sublibrary pre-release CI command on Julia 1.13.0-rc1:

GROUP=Initialization JULIA_NUM_THREADS=1 julia --project=lib/ModelingToolkitBase \
  -e 'import Pkg; Pkg.test(; coverage=true, julia_args=["--check-bounds=auto", "--compiled-modules=yes", "--depwarn=yes"], force_latest_compatible_version=false, allow_reresolve=true)'

Guess Propagation         11 / 11
InitializationSystem    638 passed, 12 broken
Initial Values            63 / 63
Testing ModelingToolkitBase tests passed
exit 0 (940.8 s)

Runic 1.7.0 also passed across all 219 tracked Julia files. Before this final rebase, all six root/direct ModelingToolkitBase Initialization CI variants were green across Julia LTS, stable, and pre-release; the new push has started a fresh CI run.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Fresh rebased CI classification: Downgrade/InterfaceI fails on the independently reproduced clean-main Symbolics API floor (CodegenFunctionOptions unavailable under the selected floor), not this PR’s LinearSolve compat or initialization tolerance changes. The prerequisite Symbolics public+documented API and stacked MTK floor audit is active. Job: https://github.com/SciML/ModelingToolkit.jl/actions/runs/29255839047/job/86835800984.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Fresh-run follow-up, all remaining completed reds match existing audits:

Together with the separately linked Symbolics downgrade floor, these remain independent of #4742.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Fresh CI verification after the final rebase:

  • Root Initialization: Julia lts, 1, and pre all pass.
  • Direct ModelingToolkitBase Initialization: Julia lts, 1, and pre all pass.

This includes the root Julia pre job that originally failed by 1.607e-9 beyond the old 1e-6 threshold.

The remaining red checks are independent base/workflow issues: the downgrade codegen regression and ModelingToolkitStandardLibrary fixture failures reproduce on clean base branches and are being handled separately; the benchmark computation completed, but its fork-token PR comment POST was rejected with HTTP 403.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

The fresh build failure in job 86835798225 is the known post-resolver documentation baseline cluster, not an Initialization regression. The same examples were reproduced after a successful docs install on then-current master and recorded in #4729: undefined incidence_matrix, PeriodicOrbitOCollProblem, FunctionMap, and Rodas4, followed by Documenter reporting [:example_block]. No test or example is being disabled or downgraded. A dedicated clean-main repair audit is queued; the currently active audit slots are occupied by other baseline failures.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 13, 2026 15:22
@ChrisRackauckas
ChrisRackauckas merged commit 34ee918 into SciML:master Jul 13, 2026
81 of 92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants